package cn.sky.demo.domain.entity;

import cn.sky.demo.enums.GenderEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author 犬小哈
 * @since 2025-10-23
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_user")
public class UserTest implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    //@TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableId(type = IdType.ASSIGN_ID)
    private Long userId;
    /**
     * 姓名
     */
    private String name;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 性别，0：女 1：男
     */
   // private Integer gender;
    private GenderEnum gender;

    /**
     * 逻辑删除 动态表名测试时暂时取消
     */
    @TableLogic
    private Integer isDeleted;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }


    @Override
    public String toString() {
        return "User{" +
            "id=" + id +
            ", name=" + name +
            ", age=" + age +
            ", gender=" + gender +
        "}";
    }
}
